package com.function;

import com.aliyun.oss.OSS;
import com.aliyun.oss.OSSClientBuilder;

public class DeleteBucket {

    public static void main(String[] args) throws Exception {

        String endpoint = "https://oss-cn-hangzhou.aliyuncs.com";
        String accessKeyId = "LTAI5tFJzoBJnCUruixbSCAS";
        String accessKeySecret = "4QnvfNNEMMbYSBwmfkS8HJrxcONid8";
        String bucketName = "wiedersehen722";

        // 创建OSSClient实例。
        OSS ossClient = new OSSClientBuilder().build(endpoint, accessKeyId, accessKeySecret);

        // 删除存储空间。
        ossClient.deleteBucket(bucketName);
        ossClient.shutdown();

    }
} 